#include "LineEdit.h"

LineEdit::LineEdit(int x, int y, int h, int w, COLORREF color)
	:x(x), y(y), h(h), w(w), bk_color(color)
{
	setcolor(color);
	setfillcolor(color);
	fillrectangle(x, y, x + w, y + h);
	setbkmode(TRANSPARENT);
	this->dTop = 2;
	this->dBottom = 2;
	this->dLeft = 2;
	this->dRight = 2;
}

void LineEdit::setText(LPCTSTR text, LPCTSTR font_family, COLORREF color)
{
	settextcolor(color);
	settextstyle(this->h - 4, 0, font_family);
	outtextxy(this->x + this->dRight, this->y + this->dTop, text);
}